package com.axeiya.cheddargetter;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;

public class CheddarGetterAPI {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		CheddarGetterClient.createInstance("emmanuel.coquelin@supinfo.com", "66manu77");
//		Subscription subscription = new Subscription("TEST");
//		Customer customer = new Customer("EMMANUELDDDDDD", "emmanuel", "ddddd", "emmanuel.coquelin@supinfo.com", subscription);
//		
//		Customer.createNewCustomer(customer);
//		getAllPricingPlans();
		
//		CGTools.deleteAllCustomers("AXEIYATESTS");
//		ArrayList<Customer> customers = CGTools.getAllCustomers("AXEIYATESTS");
//		CGTools.getAllCustomers("AXEIYATESTS");
		
		CGTools.addCustomerChargeOrCredit("AXEIYATESTS", "TESTCREATIONFULL", "fs", new Charge("158221586", 1, -25.04));
	}
	
	public static void getAllPricingPlans(){
		  
		GetMethod method = new GetMethod("/xml/plans/get/productCode/AXEIYATESTS");
		

		CheddarGetterClient.execute(method);
		
	}

}
